# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=kaffeine
pkgver=2.0.18
pkgrel=3
pkgdesc='KDE media player'
license=(GPL)
arch=(loong64 x86_64)
url='https://kde.org/applications/multimedia/org.kde.kaffeine'
depends=(kio libxss vlc)
makedepends=(extra-cmake-modules kidletime kdoctools)
source=(https://download.kde.org/stable/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
        https://invent.kde.org/multimedia/kaffeine/-/commit/209a263a.patch)
sha256sums=('d9799a5b7b94a55963f94938b36b8fcb1be3e753b2be110989934ab15386b681'
            'SKIP'
            '90efceacb58d8ac6fee32f563269fc525958783b1310f97295fdb8526802fc78')
validpgpkeys=(F909AE68FC11DF09C1755C00085F3EBD8EE4E115) # Mauro Carvalho Chehab <mchehab@s-opensource.com>

prepare() {
  patch -d $pkgname-$pkgver -p1 < 209a263a.patch # Fix DVB-T scan data update
}

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
